1. Technical Field
The present invention relates to a real time clock apparatus which is mounted on an electronic appliance to keep time and output a reference clock signal for synchronization with processing.
2. Related Art
It is known that when a mechanical switch etc., is switched from on to off or from off to on, chattering occurs that may cause malfunctions of an electronic appliance. Therefore, heretofore, a signal source such as a switch is connected to an integrated circuit formed of capacitance C and resistance R to remove chattering. However, since a chatter filtering circuit using the integrated circuit is varied in its filtering characteristics depending on the voltage characteristics and temperature characteristics of devices, it can remove minute pulses and noise, but it is difficult to accurately filter the input signal length to selectively output signals. Once the device constant is set, it is difficult to change sensitivity in a finished product. In addition to this, there is a unit to detect and process switch signals, etc. by software to determine validity of input signals. However, the difference in CPU process capability and influence of interrupt processing cause variations in determinations.
JP-A-5-53703 describes a microprocessor provided with a chatter filtering circuit which removes chattering by a logic circuit with no use of a capacitor and a resister. The chatter filtering circuit is configured of a clock generator circuit, a shift register formed of a plurality of stages, a NAND circuit and a NOR circuit disposed on the output side of the shift register, an RS flip flop to which the outputs of the NAND circuit and the NOR circuit are inputted, and so on. Each stage of the shift register is inputted with a clock signal outputted from the clock generator circuit, and a first stage of the shift register is inputted with an external input signal. Furthermore, the output of each stage of the shift register and an input signal are inputted to the NAND circuit and the NOR circuit to remove chattering. In the chatter filtering circuit, the frequency of clock signals outputted from the clock generator circuit is set to take out a given length of input signals separately from chattering.
However, the chatter filtering circuit described in JP-A-5-53703 is required to have a clock generator circuit exclusive for use in removal of chattering inside the microprocessor. Thus, in the chatter filtering circuit of JP-A-5-53703, the clock generator circuit needs to be continuously operated to remove chattering and to detect input signals, causing an increase in power consumption of an electronic appliance. Particularly, in recent years, electronic appliances are increasingly reduced in size and are formed into portables, including cellular phones, and many electronic appliances are operated by a built-in battery. There is an increasing demand for a reduction in power consumption. Moreover, in recent years, a CPU, the core of electronic appliances, is demanded to have many functions, and the number of switches provided in electronic appliances is growing. Therefore, the load of the CPU is significantly increased because of monitoring the conditions of these switches and an increase in interrupt processing, possibly causing operational delay.
The invention has been made to solve these problems, and an object is to surely detect a given length of an input signal with small power consumption.
Furthermore, an object of the invention is to remove noise such as chattering to very accurately detect only a valid input signal with respect to a length of time that is freely set by a system.
Moreover, an object of the invention is to confirm whether an input signal is made even though an electronic appliance main body is not operated.